package itdep.ui.pages.common.profile;

import ga.tapestry.commonlib.base.pages.EntityListPage;
import itdep.domain.profile.Profile;
import itdep.services.profile.ProfileService;
import org.apache.tapestry5.annotations.InjectPage;
import org.apache.tapestry5.ioc.annotations.Inject;

/**
 * @author Ivan Khalopik
 * @version $Revision: 50 $ $Date: 2010-07-06 10:11:25 +0000 (Tue, 06 Jul 2010) $
 */
public class ProfileList extends EntityListPage<Profile> {

	@Inject
	private ProfileService profileService;

	@InjectPage
	private ProfileDetails profileDetails;

	@Override
	protected Object getDetails(String state, Long recordId) {
		profileDetails.setRecordId(recordId);
		profileDetails.setState(state);
		return profileDetails;
	}

	@Override
	protected ProfileService getEntityService() {
		return profileService;
	}
}
